#!/bin/sh
# Unload requested modules.

. "${PM_FUNCTIONS}"

suspend_modules()
{
	[ -z "$SUSPEND_MODULES" ] && return $NA
	for x in $SUSPEND_MODULES ; do
		modunload $x
	done
	return 0
}

resume_modules()
{
	modreload
}

case "$1" in
	hibernate|suspend)
		suspend_modules
		;;
	thaw|resume)
		resume_modules
		;;
	*) exit $NA
		;;
esac
